<?php 

/*
 * - BACKOFFICE -
 * Page d'ajout d'un joueur dans l'annuaire
 * 
 */


echo '<h1>Ajouter un joueur</h1>';

$attributes = array('id' => 'formAjout');
echo validation_errors();
echo form_open('user/traitementAjout', $attributes) .
	form_label("Pseudonyme :", "pseudo") .
	form_input("pseudo") .
	
	form_label("Login :", "login") .
	form_input("login") .
	
	form_label("Nom :", "nom") .
	form_input("nom") .
	
	form_label("Pr&eacute;nom :", "prenom") .
	form_input("prenom") .
	
	form_label("Password :", "password") .
	form_input("password").
	form_button("password", "Generer password");
	echo "<br/>";
	
	echo form_label("Age :", "age") .
	form_input("age") .
	
	form_label("Ville :", "ville") .
	form_input("ville") .
	
	form_label("Emplacement :", "emplacement") .
	form_input("emplacement") .
	
	form_label("Photo :", "photo") .
	form_input("photo") .
	form_button("photo" ,"Choisir un fichier");
	
	echo "<br/>";
	echo form_label("Team :", "selectTeam") .
	
	'<select name="selectTeam">' .
	'   <option value=""> </option>';
	if (isset ($lesTeams)) {
		foreach($lesTeams as $uneTeam)
		{
			echo '<option value='.$uneTeam->id_team.'>'.$uneTeam->nom.'</option>';	
		}
	}
	echo '</select>';
	
	echo form_label("Admin :", "admin") .
	'<select name="selectAdmin">
		<option value="1">Non</option>
		<option value="2">Oui</option>
	</select>
	';
	echo "<br/>".form_submit("valider", "Valider") .
	
	form_close();
?>